﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CourseManager : MonoBehaviour
{
	public GameMangagers gameMangagers;
	public CourseController courseController;
	public CourseView courseView;
	// Use this for initialization
	public void Init()
	{
		gameMangagers = GameObject.Find("GameMaager").GetComponent<GameMangagers>();
		courseController = GetComponent<CourseController>();
		courseView = GetComponent<CourseView>();
		if (courseController == null)
		{
			courseController = gameObject.AddComponent<CourseController>();
			courseController.Init();
		}
		else
		{
			courseController.Init();
		}

		if (courseView == null)
		{
			courseView = gameObject.AddComponent<CourseView>();
			//courseView.Init();
		}
		else
		{
			//courseView.Init();
		}
	}

	// Update is called once per frame
	void Update()
	{

	}
}
